package cn.agiledata.bank.chinapay;

import cn.agiledata.bank.common.util.Md5Encrypt;

public class ChinaLinkUtil {
	public static String signMac(String orderId,String gateId,String amount,String retUrl,String ext1,String key)
	{
		return Md5Encrypt.md5(orderId+gateId+amount+retUrl+(ext1!=null?ext1:"")+key);
	}
	
	public static boolean verifyTransResponse(String orderId,String gateId,String amount,String code,String ext1,String key,String sign)
	{
		return Md5Encrypt.md5(orderId+gateId+amount+code+ext1+key).toUpperCase().equals(sign);
	}

}
